<template>
  <div id="app">
    <Header :key="updateKey" @updateKeyFn="updateKeyFn" />
    <Nav />
    <router-view />
    <Footer />
    <Login @updateKeyFn="updateKeyFn" />
    <transition name="fade">
      <Toast v-show="$store.state.toast.show" />
    </transition>

  </div>
</template>
<script>
import Header from "@/components/Header.vue"
import Nav from "@/components/Nav.vue"
import Footer from "@/components/Footer.vue"
import Login from "@/components/Login.vue"
import Toast from "@/components/Toast.vue"
export default {
  data() {
    return {
      updatekey: 0
    }
  },
  methods: {
    // 更新header
    updateKeyFn() {
      // console.log(query);
      this.updateKey++;
    }
  },
  components: {
    Header,
    Nav,
    Footer,
    Login,
    Toast
  }
}
</script>
<style>

</style>
